﻿using SelfMadeMillionaire.Core.Enums;
using SelfMadeMillionaire.Web.Infrastructure.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using SelfMadeMillionaire.Core.Entities;

namespace SelfMadeMillionaire.Web.Infrastructure.ViewModels.MailingList
{
	public class SubscribeViewModel
	{
		public int ID { get; set; }

		[Required]
		[DisplayName("First Name")]
		[RegularExpression(@"^[^\W\d_]+$", ErrorMessage = "Please enter a valid first name")]
		[StringLength(100)]
		public string FirstName { get; set; }

		[Required]
		[DisplayName("Last Name")]
		[RegularExpression(@"^[^\W\d_]+$", ErrorMessage = "Please enter a valid last name")]
		[StringLength(100)]
		public string LastName { get; set; }

		[Required]
		[DataType(DataType.EmailAddress)]
		[RegularExpression(Constants.EMAIL_REGX, ErrorMessage = "Please enter a valid email address")]
		[StringLength(100)]
		public string Email { get; set; }

		[Required]
		[DataType(DataType.Password)]
		[StringLength(100)]
		public string Password {get;set;}

		[Required]
		[DataType(DataType.Password)]
		[Compare("Password")]
		[DisplayName("Confirm Password")]
		public string ConfirmPassword { get; set; }

		[RequiredIf("IsSMM", true, ErrorMessage="Please select subscription level")]
		public SubscriptionType? SubscriptionLevel { get; set; }

		public bool IsSMM { get; set; }
		public bool IsMMM { get; set; }

		public bool? IsSuccess { get; set; }
        public byte ProductType { get; set; }
        public int? OrderId { get; set; }
        public string PromoCode { get; set; }
        public double SilverPrice { get; set; }
        public double GoldPrice { get; set; }
        public double PlatinumPrice { get; set; }

        public string Mailing { get; set; }
	}
}
